import * as THREE from 'three';

const geometry = new THREE.BufferGeometry();

// Create a pyramid-like shape with 4 triangular faces
// Position it differently in 3D space (offset by 150 in x direction)
const vertices = new Float32Array([
    // Base triangle 1
    150, 0, 0,
    200, 0, 0,
    175, 0, 50,
    // Base triangle 2
    200, 0, 0,
    200, 50, 0,
    175, 25, 25,
    // Side triangle
    150, 0, 0,
    175, 25, 25,
    175, 0, 50
]);

const attribute = new THREE.BufferAttribute(vertices, 3);
geometry.attributes.position = attribute;

const material = new THREE.MeshBasicMaterial({
    color: new THREE.Color('green'),
    side: THREE.DoubleSide
});

const mesh = new THREE.Mesh(geometry, material);

export default mesh;
